package com.csw.foodRecommendation.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csw.foodRecommendation.dao.Cate2Dao;
import com.csw.foodRecommendation.entity.Cate2;

/**
 * @author 1
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class Cate2ServiceImpl implements Cate2Service {
	@Autowired
	private Cate2Dao cate2Dao;

	@Override
	public List<Cate2> queryAll() {
		return cate2Dao.queryAll();
	}

	@Override
	public void add(Cate2 cate2) {
		cate2Dao.add(cate2);
	}

	@Override
	public List<Cate2> findBy(String parentId) {
		return cate2Dao.findBy(parentId);
	}

	@Override
	public Cate2 queryByid(String pid) {
		return cate2Dao.queryByid(pid);
	}
}
